﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CompanyCMS.App_Code;

namespace CompanyCMS.Admin
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (CommonBLL.Login(txName.Text,txPwd.Text))
            {
                Session["user"] =txName.Text;
                Response.Redirect("~/admin/usermanage.aspx");
            }
            else
            {
                lblmsg.Text = "用户名或者密码错误";
                lblmsg.Visible = true;
            }
        }

        protected void btnCancel_Click(object sender, EventArgs e)
        {
            txName.Text = "";
            txPwd.Text = "";
            lblmsg.Text = ""; 
            lblmsg.Visible = false;
        }
    }
}